$OpenBSD: patch-src_qt_src_gui_kernel_qkeymapper_x11_cpp,v 1.1.1.1 2013/12/20 00:54:06 sthen Exp $
--- src/qt/src/gui/kernel/qkeymapper_x11.cpp.orig	Thu Sep  5 23:36:02 2013
+++ src/qt/src/gui/kernel/qkeymapper_x11.cpp	Mon Nov 25 18:32:21 2013
@@ -282,9 +282,12 @@ QList<int> QKeyMapperPrivate::possibleKeysXKB(QKeyEven
 
     // first, translate key only using lock modifiers (there are no Qt equivalents for these, so we must
     // always use them when determining the baseKeySym)
+    // Note: the Xkb group to be used for the conversion keycode->keysym has to be given to
+    //       XkbLookupKeySym(). This information is contained in the bits 8 to 15 of xmodifiers.
+    //       See https://bugreports.qt-project.org/browse/QTBUG-15319 .
     KeySym baseKeySym;
     uint consumedModifiers;
-    if (!XkbLookupKeySym(X11->display, xkeycode, (xmodifiers & (LockMask | qt_num_lock_mask)),
+    if (!XkbLookupKeySym(X11->display, xkeycode, (xmodifiers & (0xff00 | LockMask | qt_num_lock_mask)),
                          &consumedModifiers, &baseKeySym))
         return QList<int>();
 
